package com.wgu.crawl3.web;

import com.wgu.common.global.Result;
import com.wgu.crawl3.service.CrawlService3;
import com.wgu.modules.service.BookService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * 起点免费小说爬虫 https://www.qidian.com/free
 * @Author: w
 * @Date: 2019/7/4 9:18
 * @Version 1.0
 */
@RestController
@RequestMapping("/api/crawl3")
public class CrawlController3 {
    @Resource
    private CrawlService3 crawlService3;

    @GetMapping("/book")
    public Result book(){
        List<String> urlList = new ArrayList<>();
        urlList.add("https://book.qidian.com/info/1013838884");
        urlList.add("https://book.qidian.com/info/1014119634");
        urlList.add("https://book.qidian.com/info/1013833572");
        urlList.add("https://book.qidian.com/info/1011215211");
        urlList.add("https://book.qidian.com/info/1001667168");
        urlList.add("https://book.qidian.com/info/1014165520");
        urlList.add("https://book.qidian.com/info/1005212645");
        urlList.add("https://book.qidian.com/info/1012927294");
        crawlService3.book();
        return Result.ok();
    }
}
